package com.qf.service.impl;

import com.qf.dao.AreaDao;
import com.qf.dao.impl.AreaDaoImpl;
import com.qf.pojo.Area;
import com.qf.service.AreaService;

import java.util.List;

public class AreaServiceImpl implements AreaService {

    private AreaDao areaDao=new AreaDaoImpl();
    @Override
    public List<Area> getProvince(Integer sid) {
        return areaDao.getArea(1,sid);
    }

    @Override
    public List<Area> getCity(Integer pid) {
        return areaDao.getArea(2,pid);
    }

    @Override
    public List<Area> getArea(Integer cid) {
        return areaDao.getArea(3,cid);
    }

    @Override
    public List<Area> getOneById(Integer id) {
        return areaDao.selectOne(id);
    }
}

